#include <iostream>
#include <string>

using namespace std;

// 虚函数基类
class milk_tea
{
public:
    virtual void coffee_beans()
    {
        cout << "我是咖啡豆" << endl;
    }

    virtual void tea()
    {
        cout << "我是茶包" << endl;
    }
    virtual void milk()
    {
        cout << "我是奶粉" << endl;
    }
    virtual void water()
    {
        cout << "我是饮用水" << endl;
    }
};


class high_end:public milk_tea
{
public:
    virtual void coffee_beans()
    {
        cout << "猫屎咖啡" << endl;
    }

    virtual void tea()
    {
        cout << "西湖龙井" << endl;
    }
    virtual void milk()
    {
        cout << "飞鹤奶粉" << endl;
    }
    virtual void water()
    {
        cout << "农夫山泉" << endl;
    }
};

class low:public milk_tea
{
public:
    virtual void coffee_beans()
    {
        cout << "速溶咖啡" << endl;
    }

    virtual void tea()
    {
        cout << "绿茶" << endl;
    }
    virtual void milk()
    {
        cout << "奶粉" << endl;
    }
    virtual void water()
    {
        cout << "自来水" << endl;
    }
};

// 自由组装
void func(milk_tea & coffee_beans , milk_tea & tea ,  milk_tea & milk , milk_tea & water , int n)
{
    cout << "高端奶茶制作过程:" << endl;
    cout << "咖啡豆(高端)" << endl;
    coffee_beans.coffee_beans();
    cout << "茶包(高端)" << endl;
    tea.tea();
    cout << "奶粉(高端)" << endl;
    milk.milk();
    cout << "饮用水(高端)" << endl;
    water.water();

    cout << "售价为:" << n << endl;
}

int main(int argc, char const *argv[])
{
    high_end h;
    low l;

    func(h , h , h , h , 50);
    
    return 0;
}
